<?php

namespace Sifast\ProjectBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Certifications
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Sifast\ProjectBundle\Entity\CertificationsRepository")
 */
class Certifications
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="nature_certification", type="string", length=255)
     */
    private $natureCertification;

    /**
     * @var string
     *
     * @ORM\Column(name="date_obtention", type="string", length=255)
     */
    private $dateObtention;

    /**
     * @var string
     *
     * @ORM\Column(name="date_expiration", type="string", length=255)
     */
    private $dateExpiration;

    /**
    * @var User
    * @ORM\ManyToMany(targetEntity="Application\Sonata\UserBundle\Entity\User", inversedBy="certifications")
    */
    private $users;
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set natureCertification
     *
     * @param string $natureCertification
     * @return Certifications
     */
    public function setNatureCertification($natureCertification)
    {
        $this->natureCertification = $natureCertification;
    
        return $this;
    }

    /**
     * Get natureCertification
     *
     * @return string 
     */
    public function getNatureCertification()
    {
        return $this->natureCertification;
    }

    

    /**
     * Set dateExpiration
     *
     * @param string $dateExpiration
     * @return Certifications
     */
    public function setDateExpiration($dateExpiration)
    {
        $this->dateExpiration = $dateExpiration;
    
        return $this;
    }

    /**
     * Get dateExpiration
     *
     * @return string 
     */
    public function getDateExpiration()
    {
        return $this->dateExpiration;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->users = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add users
     *
     * @param \Application\Sonata\UserBundle\Entity\User $users
     * @return Certifications
     */
    public function addUser(\Application\Sonata\UserBundle\Entity\User $users)
    {
        $this->users[] = $users;
    
        return $this;
    }

    /**
     * Remove users
     *
     * @param \Application\Sonata\UserBundle\Entity\User $users
     */
    public function removeUser(\Application\Sonata\UserBundle\Entity\User $users)
    {
        $this->users->removeElement($users);
    }

    /**
     * Get users
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getUsers()
    {
        return $this->users;
    }

    /**
     * Set dateObtention
     *
     * @param string $dateObtention
     * @return Certifications
     */
    public function setDateObtention($dateObtention)
    {
        $this->dateObtention = $dateObtention;
    
        return $this;
    }

    /**
     * Get dateObtention
     *
     * @return string 
     */
    public function getDateObtention()
    {
        return $this->dateObtention;
    }
}